package com.example.ormsqlsplicingframe1.utlis;

import com.example.ormsqlsplicingframe1.session.NodeSql;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

public class NodeSqlUtil {


    private static List<NodeSql> list;

    private static boolean isAddBatch = false;

    public static void addBatch(){
        isAddBatch = true;
    }

    public static boolean getAddBatch(){
        return isAddBatch;
    }

    static {
        list = new ArrayList<>();
    }

    public static void add(NodeSql sql){
       list.add(sql);
    }

    public static void clear(){
        list.clear();
    }


    public static List<NodeSql> getNodeSql(){
        return list;
    }
}
